﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="UserProfilePublic.aspx.cs" Inherits="VO.Web.UserProfilePublic" %>

<%@ MasterType VirtualPath="~/Site.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Profile -
        <asp:Label ID="lblPublicName" runat="server" CssClass="profilePublicName" />
    </h2>
    <p>
        &nbsp;<asp:UpdatePanel ID="pnlAllTracks" runat="server">
            <ContentTemplate>
                <ajax:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" OnActiveTabChanged="TabContainer1_ActiveTabChanged" 
                    AutoPostBack="true">
                    <ajax:TabPanel ID="TabPanel0" runat="server" HeaderText="TabPanel3">
                        <HeaderTemplate>
                            <div class="tabHeaderTracks">Info</div>
                        </HeaderTemplate>
                        <ContentTemplate>
                            Profile Logo:<br />
                            <asp:Image ID="imgUserLogo" runat="server" CssClass="userLogo" />
                            <p>
                                Description:<br />
                                <asp:TextBox ID="txtDescription" runat="server" Columns="60" Rows="5" TextMode="MultiLine"
                                    ReadOnly="true" />
                            </p>
                        </ContentTemplate>
                    </ajax:TabPanel>
                    <ajax:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1">
                        <HeaderTemplate>
                            <div class="tabHeaderTracks">User tracks</div>
                        </HeaderTemplate>
                        <ContentTemplate>
                            <p>
                                <asp:UpdatePanel ID="pnlUserTracks" runat="server">
                                    <ContentTemplate>
                                        <asp:GridView ID="gvUserTracks" runat="server" AutoGenerateColumns="False" DataSourceID="odsUserTracks" Width="100%">
                                            <Columns>
                                                <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" Visible="False" />
                                                <asp:BoundField DataField="UserId" HeaderText="UserId" SortExpression="UserId" Visible="False" />
                                                <asp:BoundField DataField="TrackName" HeaderText="TrackName" SortExpression="TrackName" />
                                                <asp:BoundField DataField="TrackCategoryId" HeaderText="TrackCategoryId" SortExpression="TrackCategoryId" />
                                                <asp:BoundField DataField="Version" HeaderText="Version" SortExpression="Version"
                                                    Visible="False" />
                                                <asp:CheckBoxField DataField="Locked" HeaderText="Locked" SortExpression="Locked"
                                                    Visible="False" />
                                                <asp:BoundField DataField="Level" HeaderText="Level" SortExpression="Level" />
                                                <asp:BoundField DataField="LastEditDate" HeaderText="LastEditDate" SortExpression="LastEditDate"
                                                    Visible="False" />
                                                <asp:BoundField DataField="CreatedDate" DataFormatString="{0: dd/MM/yyyy}" HeaderText="CreatedDate"
                                                    SortExpression="CreatedDate" />
                                                <asp:BoundField DataField="GeoString" HeaderText="GeoString" SortExpression="GeoString"
                                                    Visible="False" />
                                            </Columns>
                                        </asp:GridView>
                                        <asp:ObjectDataSource ID="odsUserTracks" runat="server" SelectMethod="GetUserTracks"
                                            TypeName="VO.Business.Controllers.TracksController">
                                            <SelectParameters>
                                                <asp:RouteParameter Name="userId" RouteKey="userId" Type="Int32" />
                                            </SelectParameters>
                                        </asp:ObjectDataSource>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </p>
                        </ContentTemplate>
                    </ajax:TabPanel>
                    <ajax:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">
                        <HeaderTemplate>
                            <div class="tabHeaderTracks">User done tracks</div>
                        </HeaderTemplate>
                        <ContentTemplate>
                            <p>
                                <asp:GridView ID="gvUserDoneTracks" runat="server" AutoGenerateColumns="False" DataSourceID="odsUserDoneTracks" Width="100%">
                                    <Columns>
                                        <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" Visible="False" />
                                        <asp:BoundField DataField="TrackId" HeaderText="TrackId" SortExpression="TrackId" />
                                        <asp:BoundField DataField="UserId" HeaderText="UserId" SortExpression="UserId" Visible="False" />
                                        <asp:BoundField DataField="ClubId" HeaderText="ClubId" SortExpression="ClubId" Visible="False" />
                                        <asp:BoundField DataField="StartTime" HeaderText="StartTime" SortExpression="StartTime" />
                                        <asp:BoundField DataField="EndTime" HeaderText="EndTime" SortExpression="EndTime" />
                                        <asp:BoundField DataField="CompletedTime" HeaderText="CompletedTime" SortExpression="CompletedTime" />
                                        <asp:BoundField DataField="PostedDate" HeaderText="PostedDate" SortExpression="PostedDate" />
                                    </Columns>
                                </asp:GridView>
                                <asp:ObjectDataSource ID="odsUserDoneTracks" runat="server" SelectMethod="GetUserTracksDones"
                                    TypeName="VO.Business.Controllers.TracksDonesController">
                                    <SelectParameters>
                                        <asp:RouteParameter Name="userId" RouteKey="userId" Type="Int32" />
                                    </SelectParameters>
                                </asp:ObjectDataSource>
                            </p>
                        </ContentTemplate>
                    </ajax:TabPanel>
                </ajax:TabContainer>
            </ContentTemplate>
        </asp:UpdatePanel>
    </p>
</asp:Content>
